/**
author: sailing
date: 2016/11/17
fun： 获取数据去画topo
***/
import fetchJson from './fetchJson'
import tools from './tools'
import data from './data'
import eventBus from '../eventBus'
import resetData from './resetData'
export default {
  start (vm, cy) {
    this.vm = vm
    this.getShortPath()
  },
  getShortPath (id, cy) {
    this.cy = cy
    console.log('dff')
    var url = tools.mergeUrl('shortPath')
    fetchJson.getJson({
      self: this,
      url: url + '?' + id,
      callback: this.callback,
      error: this.error
    })
  },
  callback (data) {
    console.log('lllllllllllllllll:', data)
    resetData.resetLineStyle()
    data.cy.add(data)
  },
  error () {
  }
}
